<?php /* Smarty version Smarty3-SVN$Rev: 3286 $, created on 2011-12-06 15:25:34
         compiled from "D:\www\beimuaihui/views/admin\qa/qaquestion_list3.tpl" */ ?>
<?php /*%%SmartyHeaderCode:85074eddc36ea03640-24732581%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'a065674ec91d23e4053fbe63c97688de48f243d8' => 
    array (
      0 => 'D:\\www\\beimuaihui/views/admin\\qa/qaquestion_list3.tpl',
      1 => 1321335912,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '85074eddc36ea03640-24732581',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
<html>
<head>
<?php $_template = new Smarty_Internal_Template('header.tpl', $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
$_template->assign('JS',@BAOGG_JS);$_template->assign('CSS',@BAOGG_CSS); echo $_template->getRenderedTemplate(); $_template->rendered_content = null;?><?php unset($_template);?>      
<style type="text/css">
	tr.survey h3 {
		 background-color: #F8F8FF;
		 text-align:center;
	}
	legend {
		 background-color: #F8F8FF;
                 font-size:14px;
                 font-weight:bold;
                padding:15px 0 5px 10px;
        }

	tr.row0 {
	   background-color: #EEF6FF;
	}
	tr.row1 {
	   background-color: #EBF2FA;
	}
	tr{
	   background-color:#D2E0F2;
	   width:100%;
	   border:1px solid #D2E0F2;
	   text-align:center;
	}
	th{
	   text-align:center;
           font-weight:bold;
           font-size:12px;
           height:30px;
	}
	td select{
	   width:150px;
	   overflow:auto;
        }	
</style>
        <script type="text/javascript"> 

        var LANG=<?php echo $_smarty_tpl->getVariable('JSLANG')->value;?>
;
	function selectQuestionByGroup(group_id){
		Ext.Array.each( Ext.query("input[name*="+group_id+"]"),function(name,index,self){ name.checked=true; });
		Ext.Array.each( Ext.query("input[value*="+group_id+"]"),function(name,index,self){ name.checked=true; })	
	}
	function checkAll(name,is_checked){
		Ext.each(Ext.query('input[type=checkbox][name="'+name+'[]"]'),function(item,index,self){ item.checked=is_checked; })
	}
	Ext.onReady(function(){
Ext.create('Ext.container.Viewport', {
    layout: 'border',
    renderTo: Ext.getBody(),
    items: [
	
Ext.create('Ext.panel.Panel', {
    region:'center',
    contentEl: 'form',
    autoScroll:true,
    bodyBorder:true,
    dockedItems:[{
        xtype: 'toolbar',
    	dock: 'top',
	items: [
        	{ xtype: 'button', 
        		
				iconCls:'save-icon',
        		text: LANG.save,handler:function(){
			Ext.Ajax.request({
				form:'form_field',
				params:{ task:'save' },
				success:function(response,opts){
                                       var result = Ext.decode(response.responseText);
                                         top.Ext.ux.ShowResult( result);
                                         if(result.success){

					window.location.href=window.location.href;
                                        }
					//console.info('success');
					//console.info(response);
				},
				failure:function(response,opts){
					window.location.href=window.location.href;
					//console.info('fail');
					//console.info(response);
				}
			});	
		} },
		{ xtype: 'button', 
				
			iconCls:'delete-icon',
			text: LANG['delete'],handler:function(){
			Ext.Ajax.request({
				form:'form_field',
				params:{ task:'delete'},
				success:function(response,opts){
                                       var result = Ext.decode(response.responseText);
                                         top.Ext.ux.ShowResult( result);
                                         if(result.success){

					window.location.href=window.location.href;
                                        }
				},
				failure:function(response,opts){
					//console.info('fail');
					window.location.href=window.location.href;
					//console.info(response);
				}
			});	
		} }

    	]   
    }]
})
]
})		
	});
	</script>


</head>
<body>
  
       
<div id="form">


	<form id="form_field" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>
">
		<?php echo $_smarty_tpl->getVariable('output')->value;?>

	
	<fieldset>
		<legend><?php echo $_smarty_tpl->getVariable('LANG')->value['is_list'];?>
</legend>
		<table><tr><th><input type="checkbox" id='check_qa_list_id' name='check_qa_list_id' onclick='checkAll("qa_list_id",this.checked)' /></th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['question_name'];?>
</th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['rule_id'];?>
</th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['title'];?>
</th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['ordering'];?>
</th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['state'];?>
</th></tr>
			<?php  $_smarty_tpl->tpl_vars['list'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('arr_list')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['list']->key => $_smarty_tpl->tpl_vars['list']->value){
?>
			<tr><td><input type="checkbox" name="qa_list_id[]" value="<?php echo $_smarty_tpl->tpl_vars['list']->value['qa_list_id'];?>
"  /></td><td><?php echo $_smarty_tpl->getVariable('arr_field')->value[$_smarty_tpl->tpl_vars['list']->value['qa_field_id']]['qa_field_name'];?>
</td><td><?php echo $_smarty_tpl->tpl_vars['list']->value['rule_id'];?>
</td><td><?php echo $_smarty_tpl->tpl_vars['list']->value['qa_list_name'];?>
</td><td><?php echo $_smarty_tpl->tpl_vars['list']->value['ordering'];?>
</td><td><?php echo $_smarty_tpl->tpl_vars['list']->value['state'];?>
</td></tr>
			<?php }} ?>
		<tr><td>&nbsp;</td><td>
		<select name="add_list_qa_field_id">
		<option value=""><?php echo $_smarty_tpl->getVariable('LANG')->value['please_select'];?>
</option>
		<?php  $_smarty_tpl->tpl_vars['field'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('arr_field')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['field']->key => $_smarty_tpl->tpl_vars['field']->value){
?>
   			<option value="<?php echo $_smarty_tpl->tpl_vars['field']->value['qa_field_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['field']->value['qa_field_name'];?>
</option>
		<?php }} ?>
		</select>
		</td>
		<td><select name="add_list_rule_id">
                        <option value="0"><?php echo $_smarty_tpl->getVariable('LANG')->value['please_select'];?>
</option>

<?php  $_smarty_tpl->tpl_vars['rule'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('arr_rule')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['rule']->key => $_smarty_tpl->tpl_vars['rule']->value){
?>
        <option value="<?php echo $_smarty_tpl->tpl_vars['rule']->value['rule_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['rule']->value['rule_name'];?>
</option>
<?php }} ?>
                </select></td>
                <td><input type="text" name="add_list_qa_list_name" /></td>
		<td><input type="text" name="add_list_ordering" /></td>
		<td>
                <input type="radio" name="add_list_state" id="add_list_state_1"   value="1" checked /><label for="add_list_state_1"><?php echo $_smarty_tpl->getVariable('arr_state')->value[1];?>
</label> 
                <input type="radio" name="add_list_state" id="add_list_state_0"   value="0" /><label for="add_list_state_0"><?php echo $_smarty_tpl->getVariable('arr_state')->value[0];?>
</label> 
                </td>
                
                </tr>
                
		</table>
	</fieldset>

	<fieldset>
		<legend><?php echo $_smarty_tpl->getVariable('LANG')->value['is_chart'];?>
</legend>
		<table><tr><th><input type="checkbox"  onclick='checkAll("qa_chart_id",this.checked)' /></th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['question_name'];?>
</th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['axis'];?>
</th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['rule_id'];?>
</th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['title'];?>
</th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['ordering'];?>
</th></tr>
			<?php  $_smarty_tpl->tpl_vars['chart'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('arr_chart')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['chart']->key => $_smarty_tpl->tpl_vars['chart']->value){
?>
			<tr><td><input type="checkbox" name="qa_chart_id[]" value="<?php echo $_smarty_tpl->tpl_vars['chart']->value['qa_chart_id'];?>
"  /></td><td><?php echo $_smarty_tpl->getVariable('arr_field')->value[$_smarty_tpl->tpl_vars['chart']->value['qa_field_id']]['qa_field_name'];?>
</td><td><?php echo $_smarty_tpl->tpl_vars['chart']->value['qa_chart_type'];?>

                        </td><td><?php echo $_smarty_tpl->tpl_vars['chart']->value['rule_id'];?>
</td><td><?php echo $_smarty_tpl->tpl_vars['chart']->value['qa_chart_name'];?>
</td><td><?php echo $_smarty_tpl->tpl_vars['chart']->value['ordering'];?>
</td></tr>
			<?php }} ?>
		<tr><td>&nbsp;</td><td>
		<select name="add_chart_qa_field_id">
		<option value=""><?php echo $_smarty_tpl->getVariable('LANG')->value['please_select'];?>
</option>
		<?php  $_smarty_tpl->tpl_vars['field'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('arr_field')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['field']->key => $_smarty_tpl->tpl_vars['field']->value){
?>
   			<option value="<?php echo $_smarty_tpl->tpl_vars['field']->value['qa_field_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['field']->value['qa_field_name'];?>
</option>
		<?php }} ?>
		</select>
		</td><td>
		<select name="add_chart_qa_chart_type">
			<option value="0">X<?php echo $_smarty_tpl->getVariable('LANG')->value['axis'];?>
</option>
			<option value="1">Y<?php echo $_smarty_tpl->getVariable('LANG')->value['axis'];?>
</option>
		</select>
		</td>
		<td><select name="add_chart_rule_id">
                        <option value="0"><?php echo $_smarty_tpl->getVariable('LANG')->value['please_select'];?>
</option>

<?php  $_smarty_tpl->tpl_vars['rule'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('arr_rule')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['rule']->key => $_smarty_tpl->tpl_vars['rule']->value){
?>
        <option value="<?php echo $_smarty_tpl->tpl_vars['rule']->value['rule_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['rule']->value['rule_name'];?>
</option>
<?php }} ?>
                </select></td>
                <td><input type="text" name="add_chart_qa_chart_name" /></td>
		<td><input type="text" name="add_chart_ordering" /></td></tr>
		</table>
	</fieldset>

	<fieldset>
		<legend><?php echo $_smarty_tpl->getVariable('LANG')->value['is_filter'];?>
</legend>
		<table><tr><th><input type="checkbox" onclick='checkAll("qa_filter_id",this.checked)' /></th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['question_name'];?>
</th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['op'];?>
</th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['answer'];?>
</th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['order'];?>
</th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['state'];?>
</th></tr>
	 	<?php  $_smarty_tpl->tpl_vars['filter'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('arr_filter')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['filter']->key => $_smarty_tpl->tpl_vars['filter']->value){
?>
			<tr><td><input type="checkbox" name="qa_filter_id[]" value="<?php echo $_smarty_tpl->tpl_vars['filter']->value['qa_filter_id'];?>
" /></td><td><?php echo $_smarty_tpl->getVariable('arr_field')->value[$_smarty_tpl->tpl_vars['filter']->value['qa_field_id']]['qa_field_name'];?>
</td><td><?php echo $_smarty_tpl->tpl_vars['filter']->value['operation'];?>
</td><td><?php echo $_smarty_tpl->tpl_vars['filter']->value['values'];?>
</td><td><?php echo $_smarty_tpl->tpl_vars['filter']->value['ordering'];?>
</td><td><?php echo $_smarty_tpl->tpl_vars['filter']->value['state'];?>
</td></tr>
		<?php }} ?>
		<tr><td>&nbsp;</td><td>
		<select name="add_filter_qa_field_id">
		<option value=""><?php echo $_smarty_tpl->getVariable('LANG')->value['please_select'];?>
</option>
		<?php  $_smarty_tpl->tpl_vars['field'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('arr_field')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['field']->key => $_smarty_tpl->tpl_vars['field']->value){
?>
   			<option value="<?php echo $_smarty_tpl->tpl_vars['field']->value['qa_field_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['field']->value['qa_field_name'];?>
</option>
		<?php }} ?>
		</select>
		</td><td>
			<select name="add_filter_operation">
				<option value=""><?php echo $_smarty_tpl->getVariable('LANG')->value['please_select'];?>
</option>
				<?php  $_smarty_tpl->tpl_vars['operation'] = new Smarty_Variable;
 $_smarty_tpl->tpl_vars['code'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('arr_operation')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['operation']->key => $_smarty_tpl->tpl_vars['operation']->value){
 $_smarty_tpl->tpl_vars['code']->value = $_smarty_tpl->tpl_vars['operation']->key;
?>
   					<option value="<?php echo $_smarty_tpl->tpl_vars['code']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['operation']->value;?>
</option>
				<?php }} ?>
			</select>
		</td><td><input type="text" name="add_filter_values" /></td>
                <td><input type="text" name="add_filter_ordering" /></td>
                <td>
                 <input type="radio" name="add_filter_state" id="add_filter_state_1"   value="1" checked /><label for="add_filter_state_1"><?php echo $_smarty_tpl->getVariable('arr_state')->value[1];?>
</label> 
                <input type="radio" name="add_filter_state" id="add_filter_state_0"   value="0" /><label for="add_filter_state_0"><?php echo $_smarty_tpl->getVariable('arr_state')->value[0];?>
</label> 

                </td>
                </tr>
		</table>
	</fieldset>
	<fieldset>
		<legend><?php echo $_smarty_tpl->getVariable('LANG')->value['is_sort'];?>
</legend>
		<table><tr><th><input type="checkbox" onclick='checkAll("qa_sort_id",this.checked)' /></th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['question_name'];?>
</th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['dir'];?>
</th><th><?php echo $_smarty_tpl->getVariable('LANG')->value['order'];?>
</th></tr>
			<?php  $_smarty_tpl->tpl_vars['sort'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('arr_sort')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['sort']->key => $_smarty_tpl->tpl_vars['sort']->value){
?>
			<tr><td><input type="checkbox" name="qa_sort_id[]" value="<?php echo $_smarty_tpl->tpl_vars['sort']->value['qa_sort_id'];?>
" /></td><td><?php echo $_smarty_tpl->getVariable('arr_field')->value[$_smarty_tpl->tpl_vars['sort']->value['qa_field_id']]['qa_field_name'];?>
</td><td><?php echo $_smarty_tpl->tpl_vars['sort']->value['dir'];?>
</td><td><?php echo $_smarty_tpl->tpl_vars['sort']->value['ordering'];?>
</td></tr>
			<?php }} ?>
		<tr><td>&nbsp;</td><td>
		<select name="add_sort_qa_field_id">
		<option value=""><?php echo $_smarty_tpl->getVariable('LANG')->value['please_select'];?>
</option>
		<?php  $_smarty_tpl->tpl_vars['field'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('arr_field')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['field']->key => $_smarty_tpl->tpl_vars['field']->value){
?>
   			<option value="<?php echo $_smarty_tpl->tpl_vars['field']->value['qa_field_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['field']->value['qa_field_name'];?>
</option>
		<?php }} ?>
		</select>
		</td><td>
		<select name="add_sort_dir">
			<option value="asc"><?php echo $_smarty_tpl->getVariable('LANG')->value['asc'];?>
</option>
			<option value="desc"><?php echo $_smarty_tpl->getVariable('LANG')->value['desc'];?>
</option>
		</select>
		</td><td><input type="text" name="add_sort_ordering" /></td></tr>
		</table>
	</fieldset>


	</form>
</div>



</body>
</html>
